//
//  CAnimal.m
//  MacConsole
//
//  Created by MacVM on 2024/1/1.
//

#import "CAnimal.h"

@implementation CAnimal

- (nonnull NSString *)getName {
    return firstName;
}

- (void)setAge:(int)_age {
    age = _age;
}

- (void)setFullName:(nonnull NSString *)_firstName lastName:(nonnull NSString *)_lastName {
    firstName = _firstName;
    lastName = _lastName;
}

- (void)setName:(nonnull NSString *)_name {
    firstName = _name;
}

//- (nonnull NSString *)ToString {
- (NSString *)description {
    return [NSString stringWithFormat:@"name:%@, age:%d", [self getFullName], age];
}

- (nonnull NSString *)getFullName {
    return [NSString stringWithFormat:@"%@.%@", firstName, lastName];
}

- (void)setAll:(int)_age firstName:(nonnull NSString *)_firstName lastName:(nonnull NSString *)_lastName {
    age = _age;
    firstName = _firstName;
    lastName = _lastName;
}

@end
